package com.jeespring.atomikos.controller;

import com.jeespring.atomikos.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping("/submitOrder")
    public void submitOrder(){
        try {
            orderService.submitOrder();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
